import selftPickupApi from '@/api/declaration/mall/selftPickupApi'
import httpRequest from '@/config/axios/httpRequest'
import { DeliveryPickUpStoreModel } from '@/models/mall/DeliveryPickUpStoreModel'


// 查询自提门店列表
export const getDeliveryPickUpStorePage = async (params: any) => {
  return await httpRequest.get(selftPickupApi.GetDeliveryPickUpStorePage, { params })
}

// 查询自提门店详情
export const getDeliveryPickUpStore = async (id: number) => {
  return await httpRequest.get(selftPickupApi.GetDeliveryPickUpStore, { params: { id } })
}

// 查询自提门店精简列表
export const getSimpleDeliveryPickUpStoreList = async () => {
  return await httpRequest.get(selftPickupApi.GetSimpleDeliveryPickUpStoreList)
}

// 新增自提门店
export const createDeliveryPickUpStore = async (data: DeliveryPickUpStoreModel) => {
  return await httpRequest.post(selftPickupApi.CreateDeliveryPickUpStore, data)
}

// 修改自提门店
export const updateDeliveryPickUpStore = async (data: DeliveryPickUpStoreModel) => {
  return await httpRequest.put(selftPickupApi.UpdateDeliveryPickUpStore, data)
}

// 删除自提门店
export const deleteDeliveryPickUpStore = async (id: number) => {
  return await httpRequest.delete(selftPickupApi.DeleteDeliveryPickUpStore, {params: {id}})
}

// 绑定自提店员
export const bindStoreStaffId = async (data: any) => {
  return await httpRequest.post(selftPickupApi.BindStoreStaffId, data)
}
